<?php /* Smarty version Smarty-3.0.7, created on 2015-01-15 10:17:10
         compiled from "E:/project/runtime/development/company/dl0001/0003/app_0001/view\oui/common/upload/view.html" */ ?>
<?php /*%%SmartyHeaderCode:3208854b7232652e0a3-41382701%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'ab079fa8b50a2e69b5a93701ad5270d2c20d0800' => 
    array (
      0 => 'E:/project/runtime/development/company/dl0001/0003/app_0001/view\\oui/common/upload/view.html',
      1 => 1420864680,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '3208854b7232652e0a3-41382701',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<div class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" id=x-upload-model-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 >
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">图片预览</h3>
    </div>
    <div class="modal-body">
        <p><img id=x-upload-preview-image-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
></p>
    </div>
    <div class="modal-footer hidden">
        <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button class="btn btn-primary">Save changes</button>
    </div>
</div>
<!--优雅的分隔线-->
<div class="input-append">
    <form enctype="multipart/form-data" method="post" id="x-upload-form-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
" name="x-upload-form-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
" target="_x-upload-target-paniel-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
" action="<?php echo $_smarty_tpl->smarty->registered_objects['Route'][0]->MakeHyperLink(':common_upload::execute');?>
" style="padding:0px;margin:0px;width: 350px;position:relative;">
        <input id=x-upload-name-paniel-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 name=x-upload-name-paniel-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 type="text" id="cover" readonly="readonly" disabled="disabled" style="z-index:3;width:273px;"/>
        <button id=x-upload-button-browser-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 name=x-upload-button-browser-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 type="button" class="btn" style="z-index:1;width: 60px;">浏览</button>
        <button id=x-upload-button-upload-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 name=x-upload-button-upload-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 class="btn hidden" type="submit" style="width: 60px;">上传</button>
        <button id=x-upload-button-preview-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 name=x-upload-button-preview-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 style="border: 0px; background-color: #FFFFFF;padding-top: 8px;"><i class="icon-picture" ></i></button>
        <input type="file" id=x-upload-file-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 name=x-upload-file-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 id="x-upload-file" style="border:1px solid rgb(255,0,0);border-image:none;top:0px;font-size:100px;position:absolute;cursor:pointer;right:0px;overflow:hidden;z-index:1;opacity:0;-moz-opacity: 0;filter:alpha(opacity = 0);" />
        <input type="hidden" id=x-upload-data-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 name="x-upload-data" value=<?php echo $_smarty_tpl->getVariable('data')->value['sourceControlId'];?>
,<?php echo $_smarty_tpl->getVariable('data')->value['errorPanelId'];?>
,x-upload-file-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
,x-upload-name-paniel-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
,<?php echo $_smarty_tpl->getVariable('data')->value['type'];?>
,<?php echo $_smarty_tpl->getVariable('data')->value['path'];?>
>
        <script type="text/javascript">
            var data=$('#x-upload-data-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
').val().split(',');
            var sourceControl=$('#'+data[0]);
            if(sourceControl.val()===''){
                $('#x-upload-button-preview-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
').hide();
            }
            else{
                $path=data[5].replace(/\\/,'/');
                $('#x-upload-preview-image-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
').attr('src','<?php echo @BUILD_PATH;?>
'+$path+'/'+sourceControl.val());
            }
            //~
            $('#x-upload-file-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
').change(function(){
                var filename=$(this).val().split('\\');
                if(filename.length===1){
                    filename=$(this).val().split('/');
                }
                filename=filename[filename.length-1];
                $('#x-upload-name-paniel-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
').val(filename);
                $('#x-upload-form-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
').submit();
            });
            //~
            $('#x-upload-button-preview-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
').click(function(){
                $('#x-upload-model-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
').modal().css({
                    'margin-top': function () {
                        return -($(this).height());
                    }
                });
                $('#x-upload-model-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
').modal('show');
                return false;
            });
        </script>
    </form>
    <iframe class="hidden" id=_x-upload-target-paniel-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
 name=_x-upload-target-paniel-<?php echo $_smarty_tpl->getVariable('data')->value['number'];?>
></iframe>
</div>